home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds / vmstat.man < prev    next >
Text File  |  1990-07-03  |  14KB  |  285 lines

  1. ' $Header: /sprite/src/cmds/vmstat/RCS/vmstat.man,v 1.3 90/07/03 16:26:45 mendel Exp $ SPRITE (Berkeley)
  2. .so \*(]ltmac.sprite
  3. .HS VMSTAT cmds
  4. .BS
  5. .SH NAME
  6. vmstat \- print virtual memory stats
  7. .SH SYNOPSIS
  8. \fBvmstat \fR[\fB\-svmP\fR] [\fB\-t \fIinterval\fR] [\fB\-T \fImaxSkip\fR] [\fB\-l \fIlines\fR] [\fB\-fp \fIthreshold\fR]
  9. .SH OPTIONS
  10. .IP "\fB\-s\fR" 14
  11. Print out statistics about all in-use segments instead of overall vm stats.
  12. .IP "\fB\-v\fR" 14
  13. Print out extra information when printing overall vm stats.
  14. .IP "\fB\-t \fIinterval\fR" 14
  15. Print out a line of terse vm stats every \fIinterval\fR seconds.  If 
  16. \fIinterval\fR is specified as 0 then only a single line is printed.
  17. .IP "\fB\-m\fR" 14
  18. Print out the number of modified pages instead of kernel stack pages when using
  19. the \fB\-t\fR option.
  20. .IP "\fB\-l \fInumLines\fR" 14
  21. Print out \fInumLines\fR lines before printing the header again when
  22. using the \fB\-t\fR option.
  23. The default is 25 lines.
  24. .IP "\fB\-f \fIthreshold\fR" 14
  25. Number of page faults per second before should print out stats with 
  26. the \fB\-t\fR option.
  27. No lines will be printed unless more than \fIthreshold\fR page faults occur
  28. or the \fB\-p\fR or \fB\-T\fR options are in effect.
  29. .IP "\fB\-p \fIthreshold\fR" 14
  30. Number of page-outs per second before should print out stats with the 
  31. \fB\-t\fR option.
  32. No lines will be printed unless more than \fIthreshold\fR page-outs occur
  33. or the \fB\-f\fR or \fB\-T\fR options are in effect.
  34. .IP "\fB\-T \fImaxSkip\fR" 14
  35. Maximum number of times to skip printing out statistics because of the
  36. \fB\-f\fR and \fB\-p\fR options.
  37. .IP "\fB\-P\fI" 14
  38. Print out statistics since the last time that they were printed, not
  39. since the last interval.  Used with the \fB\-t\fR option.
  40. .BE
  41.  
  42. .SH DESCRIPTION
  43. .LP
  44. This command prints out virtual memory statistics.  There are three
  45. possible formats and types of information that are printed.
  46. The default is to print overall virtual memory
  47. statistics; the volume of statistics that are printed is controlled by
  48. the \fB\-v\fR option.  If the \fB\-s\fR option is specified then statistics about
  49. all actively used segments are printed instead.  If the \fB\-t\fR option
  50. is specified then a terse line of information is printed at regular
  51. intervals;  the \fB\-TlfpPm\fR options control how the data is formatted
  52. and how often it is printed.
  53. The next three sections describe the three printing formats in more detail.
  54. .SH "GENERAL STATISTICS"
  55. By default \fBvmstat\fR prints out general statistics about the virtual memory 
  56. system.  If the \fB\-v\fR option is specified then more detailed statistics
  57. will be printed.  The normal information that is printed is divided into
  58. 5 sections: memory use, segment use, page fault statistics, page-out 
  59. statistics and copy-on-write activity.  The memory use section is titled
  60. ``MEMORY STATS'' and contains 6 lines of information with the following
  61. titles and information:
  62. .IP "\fIPage Size\fR" 15
  63. The logical page size; this is a multiple of the physical page size.
  64. .IP "\fIMemory Size\fR" 15
  65. The amount of physical memory in Kbytes that is available on the machine.
  66. .IP "\fIKernel Memory\fR" 15
  67. The amount of memory in Kbytes that is being used by the kernel.  There are
  68. four pieces of information on this line (from left to right):
  69. the total amount of memory used by the kernel, the portion of the total
  70. that is used for kernel 
  71. code and data, the portion used for kernel stacks and the portion that is 
  72. kept in emergency reserve.
  73. .IP "\fIUser Memory\fR" 15
  74. The amount of memory in Kbytes that is being used by user processes.  There
  75. are 3 pieces of information on this line (from left to right):
  76. the total amount of memory used by user processes, the portion of the total
  77. that is dirty and the portion that is clean. 
  78. .IP "\fIFS Memory\fR" 15
  79. The amount of memory in Kbytes that is being used by the file system.
  80. The 3 pieces of information on this line are (from left to right): the
  81. total amount of memory used by the file system, the minimum amount of memory
  82. that has ever been used and the maximum amount that has been used.
  83. .IP "\fIFree Memory\fR" 15
  84. The amount of memory in Kbytes that is not being used by anyone.
  85. .LP
  86. The second section of statistics is entitled ``SEGMENT STATS''.  This section
  87. contains four lines of information, one each for active code segments,
  88. inactive code segments, heap segments and stack segments.  Each contains
  89. the number of segments of the given type and the amount of memory in 
  90. Kbytes that is being used by the particular type of segment.
  91. .LP
  92. The third section of statistics is entitled ``FAULT STATS''.  The first
  93. line contains the total number of faults.  The second line divides the
  94. total faults into the 7 different types of faults:
  95. .IP "\fIZero\fR" 10
  96. Pages that are filled with zeroes.
  97. .IP "\fIFS\fR" 10
  98. Pages that are filled from an object file in the file system.
  99. .IP "\fISwap\fR" 10
  100. Pages that are filled from a swap file.
  101. .IP "\fIQuick\fR" 10
  102. Page faults that were handled merely by validating the page in hardware.
  103. .IP "\fICOW\fR" 10
  104. Copy-on-write faults.
  105. .IP "\fICOR\fR" 10
  106. Copy-on-reference faults.
  107. .IP "\fICOR-mod\fR" 10
  108. Faults that occured because pages that were filled because of copy-on-reference
  109. faults were marked as read-only.  This is done to compare copy-on-reference
  110. to copy-on-write (see \fIvmcmd\fR for details).
  111. .LP
  112. The third line divides the faults into the different segments that the
  113. faults occured in.  The last line is the number of faults that collided with
  114. another process faulting on the same page.
  115. .LP
  116. The fourth section which is entitled ``PAGE-OUTS'' contains the number of
  117. pages that were written to swap space.
  118. .LP
  119. The last section is entitled ``COPY-ON-WRITE'' and contains statistics
  120. about copy-on-write and copy-on-reference behavior.  The information in
  121. this section is presented as the number of faults that occured divided
  122. by the number of copy-on-write or copy-on-reference pages.  Statistics
  123. are presented for both heap and stack segments separately (the entries
  124. are labeled \fIHeap\fR and \fIStack\fR respectively) and for the sum
  125. of the heap and stack statistics (labeled \fITot\fR).  The first two
  126. lines contain information about copy-on-write (COW) behavior, the second
  127. two about copy-on-reference (COR) behavior and the last two 
  128. about the percentage
  129. of pages that were copied because of copy-on-reference faults that were
  130. eventually modified (COR-mod).  The information about COW behavior contains
  131. an additional statistic labeled \fIQuick\fR which is the number of 
  132. copy-on-write faults that were handled by merely changing the protection;
  133. no copy was required.
  134. .LP
  135. When the \fB\-v\fR option is specified additional results are presented.
  136. These results are more obscure and are probably only of interest to those who
  137. understand the internals of the Sprite virtual memory system.  The first
  138. additional statistic is a measurement of the need for modify bits
  139. and is given under the ``MEMORY STATS'' section.  This line of statistics
  140. which is labeled \fIMod page stats\fR gives three bits of information.
  141. The first entry (labeled \fIPot-mod\fR) is the number of
  142. page frames that were being actively used by heap and stack segments
  143. that were taken away from the segment and given to another segment; since
  144. these segments are writable, the pages in these segments are potentially
  145. modified.
  146. The second entry (labeled \fINot-mod\fR) is the number of potentially modified
  147. pages that were clean.  The last entry (labeled 
  148. \fINot-hard-mod\fR) is the number of potentially modified pages that did
  149. not have the hardware modify bit set; pages can be marked as modified by
  150. the virtual memory system (e.g. zero-filled pages) even though they do not
  151. have the modify bit set by the hardware.
  152. .LP
  153. The second extra set of statistics is under the ``PAGE-OUTS'' section.  The
  154. first extra line which is labeled \fIClean-wait\fR is the number of times that
  155. processes that were exiting had to wait because a page that they were
  156. freeing was being cleaned.  The second line labeled \fICleaner starts\fR 
  157. is the number of times that a page cleaner was started up to write out
  158. pages.
  159. .LP
  160. The remaining extra statistics that are printed with the \fB\-v\fR option
  161. are under entirely different sections.  The first section which is
  162. entitled ``ALLOCATION STATS'' gives statistics about the allocation of
  163. memory.  The first line which is labeled \fIVm allocs\fR gives the
  164. following information (from left to right): the total number of pages that
  165. were allocated, the portion of this total that came from the free list,
  166. the portion that came from the file system and the portion that came from
  167. the allocate list.  The second line which is labeled \fIVM-FS stats\fR gives
  168. statistics about the virtual memory and file system negotiation.  The
  169. first two entries give the number
  170. of times that the file system asked the virtual memory system for the
  171. age of its oldest page (labeled \fIFS-asked\fR) and the number of these 
  172. times that a free page was available (labeled \fIHad-free-page\fR).
  173. The second two entries give the number of pages that the file system added
  174. to its cache and the number of pages that it deleted from its cache
  175. (labeled \fIFS-map\fR and \fIFS-unmap\fR respectively).
  176. .LP
  177. The next two lines of statistics under the ``ALLOCATION STATS'' section
  178. contains information about searching the memory lists.  The
  179. first line gives how many times that the lists were searched for pages and
  180. how many times the memory was found on the free list and how many times
  181. it was found on the allocation list (labeled \fIFree\fR and \fIIn-use\fR
  182. respectively).  The second line gives information about why multiple
  183. iterations through the allocation list were required; most of the time
  184. the first element on the list can be used.  This line contains the
  185. following information from left to right: the total number of extra searches,
  186. the portion of extra searches that were required because
  187. the page frame was locked (labeled \fILock\fR), the page frame was
  188. referenced (\fIlabeled \fIRef\fR) or the page frame was dirty
  189. (\fIDirty\fR).
  190. .LP
  191. The next section of statistics is entitled ``LIST STATS''.  This
  192. section gives the current number of pages that are
  193. on each of the four memory list.
  194. .LP
  195. The next section is labeled ``PAGE MAPPING STATS''.  This section gives
  196. the number of times a process had to wait because the fixed number of slots
  197. that are used to map user pages into the kernel's virtual address spacce
  198. were all in use.
  199. .LP
  200. The last section is entitled ``HARDWARE STATS'' and contains
  201. information that depends on the hardware.  For Sun workstations it
  202. contains statistics about many times one of the 8 hardware contexts had
  203. to be taken away from one process and given to another and the number
  204. of times that a hardware PMEG had to be taken away from one segment and
  205. given to another. For MIPS R2000/R3000 based machines such as
  206. DecStations, the number of times TLB pids were stolen from active processes
  207. is reported.
  208. .SH "SEGMENT STATISTICS"
  209. .LP
  210. When the \fI-s\fR option is given to \fBvmstat\fR then statistics about all 
  211. in use segments are printed.  There are 6 columns of information:
  212. .IP \fISEG-NUM\fR 20
  213. The segment number.
  214. .IP \fITYPE\fR 20
  215. The type of segment.  The segment type can be
  216. \fIInactive\fR for inactive code segments or \fICode\fR, \fIHeap\fR  or
  217. \fIStack\fR for the other three types of segments.
  218. .IP \fISIZE\fR 20
  219. The total size of the segment's virtual addres space in Kbytes.
  220. .IP \fIRES-SIZE\fR 20
  221. The amount of physical memory occupied by the segment in Kbytes.
  222. .IP \fINUM-REFS\fR 20
  223. The number of processes that are actively using this segment.
  224. .IP \fIOBJECT-FILE-NAME\fR 20
  225. The name of the object file that the code segment is being demand loaded
  226. from.
  227. .LP
  228. After the information about each individual segment is printed a summary
  229. of the segment information is printed.
  230. .SH "STATISTICS AT REGULAR INTERVALS"
  231. .LP
  232. If the \fB\-t \fIinterval\fR option is given to \fBvmstat\fR then a line of 
  233. terse statistics is printed out at regular intervals.  If \fIinterval\fR is 0 
  234. then only a single line of statistics is printed.  If \fIinterval\fR is
  235. greater than 0 then a line of statistics is printed out every
  236. \fIinterval\fR seconds.  If the \fB\-f \fIfaultThreshold\fR and/or
  237. \fB\-p \fIpageoutThreshold\fR options are used then statistics will be
  238. checked every \fIinterval\fR seconds but only will be printed out
  239. if the number of page faults in the last interval is greater than 
  240. \fIfaultThreshold\fR or the number of pageouts is greater than 
  241. \fIpageoutThreshold\fR.  If the \fB\-T \fImaxSkip\fR option is used then
  242. statistics will be printed out at least every \fImaxSkip\fR intervals
  243. regardless whether or not enough page-outs or page faults have occured.
  244. .LP
  245. All memory use statistics are printed in units of 1024 bytes.
  246. Each line contains 10 columns of information:
  247. .IP \fIAVAIL\fR 10
  248. The total amount of physical memory available.
  249. .IP \fIFREE\fR 10
  250. The amount of memory that is not being used by anyone.
  251. .IP \fIUSER\fR 10
  252. The amount of memory that is being used by user processes.
  253. .IP \fIKMEM\fR 10
  254. The amount of memory that is being used by the kernel for code and data.
  255. .IP \fIKSTK\fR 10
  256. The amount of memory that is being used for kernel stacks.
  257. .IP \fIFS$\fR 10
  258. The size of the file system cache.
  259. .IP \fIPF-NUM\fR 10
  260. The number of page faults that have occured. 
  261. .IP \fIPF-SWP\fR 10
  262. The number of page faults that were filled from swap space.
  263. .IP \fIPF-FS\fR 10
  264. The number of page faults that were filled from the file system.
  265. .IP \fIPOUTS\fR 10
  266. The number of pages that were written to swap space.
  267. .LP
  268. If the \fB\-m\fR option is specified then the \fIKSTK\fR column will be
  269. replaced by a column labeled \fIMOD%\fR which contains the percentage
  270. of user memory that is modified.  The number of kernel stack pages
  271. will be added into the statistics under the \fIKMEM\fR column.
  272. .LP
  273. By default a new column header line will be printed after 25 lines of
  274. output.  The \fB\-l \fIlines\fR option can be used to force the header line
  275. to be printed after \fIlines\fR lines of output are printed.
  276. .LP
  277. The number of page faults and page-outs that are printed are by default
  278. the number since the last interval.  However, many intervals can
  279. be skipped because of the \fB\-f\fR and \fB\-p\fR options.  The
  280. \fB\-P\fR option will force \fBvmstat\fR to print out the number of faults and
  281. pageouts since the last time that a line was printed instead of since the 
  282. last interval.
  283. .SH KEYWORDS
  284. virtual memory, statistics
  285.